Skip to content

Shared sessions: owner-left notice, a timed link with End session, language and terminal fixes, no built-in Firebase config - #143

Merged
vickeykumar merged 10 commits into
masterfrom
development
Nov 14, 2026
Merged

vickeykumar merged 10 commits into
masterfrom
development

Conversation

@vickeykumar

Copy link
Copy Markdown
Owner

What changes

  • Owner left: a collaborator is told in a popup and a bar when the owner left, was never there, or the session ended or expired. Their edits stay in their page, Run is off, and "Copy it to my own editor" makes a code link of what is on the page (the owner's workspace is never touched).
  • A timed share link: opening Share starts a session. A guest picks 30 minutes or 1 hour, a signed-in user up to 7 days (admin settings "Longest a share link works"). There is a countdown, Add time and End session. The link is the same after a reload. At the end, or when the time runs out, the people on it are told and everything of the session is deleted from Firebase.
  • Collaborator fixes: joining or reloading no longer moves both pages to Assembly or restarts the owner's REPL, and a collaborator sees what the owner's terminal already holds.
  • Language: the home page opens in the language chosen last; a stale language record of a session no longer replaces it.
  • Firebase config: /config.js no longer has a built-in (production) project. Without OPENREPL_FIREBASE_CONFIG it serves null and a console error, the log says firebase: NOT SET, and the admin health page fails the Firebase line.

Before deploying

  • OPENREPL_FIREBASE_CONFIG must be set in production, or sign-in and shared sessions stop working.
  • The time of a link is not a lock: nothing on a server checks it. A Firebase Security Rules design for a real lock is drawn up and not part of this PR.

Tests

  • New browser tests: shared-owner-left, shared-link-time, shared-language, shared-terminal, remember-language (run locally against a Firebase Realtime Database emulator), plus Go tests for the limits, the Genie notes and the Firebase config. Page tests 186 pass.

🤖 Generated with Claude Code

vickeykumar and others added 10 commits November 14, 2026 10:57
…ith End session, and fixes for the language and the terminal of a joining collaborator

- A collaborator is told, in a popup and a bar, when the owner left, was never there or the session ended; Run and sharing of their own edits are off, and "Copy it to my own editor" makes a code link of what is on the page.
- Share has a time (guest 30 minutes or 1 hour, signed in up to 7 days, admin limits), a countdown, Add time and End session; the link is the same through reloads; when it ends or runs out everything of the session is deleted from Firebase.
- A collaborator joining or reloading no longer moves both pages to Assembly or restarts the owner's REPL, and sees what the owner's terminal already holds.
- The home page opens in the language chosen last; a stale language record of the session no longer replaces it.
- /config.js has no built-in Firebase project any more: without OPENREPL_FIREBASE_CONFIG it says so.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…over sessions in Firebase from the server

- When a shared session ends or expires, a collaborator's page can only read: the editor is read-only, every Firebase write from the page is dropped (except the cleanup), the terminal and peer chat send nothing, the file browser and uploads are refused. The cleanup also removes chat-list/<id>.
- A server job removes, every so many hours (admin setting, default 24), the sessions whose link ended or ran out and the sessions left with no owner, from openrepl, editor_values, chat-list and file-browser. It signs in to the Realtime Database as the service account of OPENREPL_FIREBASE_ADMIN (or OPENREPL_FIRESTORE_CREDENTIALS); the Health page shows its last run.
- .env.example and README: OPENREPL_FIREBASE_ADMIN, and no built-in Firebase project any more.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… admin, a weekly cleanup

- Creating a code link takes the last day it works (a date input from tomorrow up to the admin's most, a month ahead picked for you); the server checks the range and keeps the end as 23:59:59 UTC of that day.
- An ended link answers 410 with no code, and /s/<id> says it has expired.
- Links made before they had an end are given one a month from the first start with this, once; the server removes ended links every week (Health shows the last run).
- Admin: "Longest a code link works" (1 to 365 days, default 30) and an Expires column in the list of shared code.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…al record behind, and the editor's mode could replace a file's picture or PDF

- The wipe of a session called a function that is not on the page, so openrepl/<id> was never removed; it removes it by its path now.
- The owner's page stops writing to Firebase when it ends the session (its terminal wrote the record again), and a collaborator's page that finds a session gone wipes what it wrote before it knew.
- The editor's mode follows the picker only while the list is still on its first entry, and a later change of the picker does not replace "Image" or "PDF" that a file set.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… file chosen a moment after another, and a collaborator that started in C

- The editor's language list has C and C++ as two entries that follow the picker's C and CPP one to one; Ace colours both with its one mode, a file by its extension picks one of them, and a record of an older page that says c_cpp is read as the language the picker is on.
- Choosing a file of one language 2.5 to 3.5 seconds after a file of another left the first language: the page's late look at the editor's language put the picker's language back. A selected code file now decides it.
- A collaborator's page starts its terminal in the owner's language, and says nothing about its own until it has it, so the owner's page no longer restarts in C.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ner's language late no longer moves the owner's page

On a slow runner the collaborator's page started in the picker's first choice (C) and then wrote that language to the session, so the owner's page followed it. A collaborator now says nothing of its language (to the session or to the owner's terminal) until the first record of the session is read and applied. A test holds the collaborator's messages back to show it: it failed before and passes now.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ns B2 keeps of a snapshot, and let the snapshot interval be saved

- The Object storage box of the live map says how much the bucket holds, counted from the store's own listing (objects and the older versions a versioned bucket keeps), in the background and kept for 30 minutes.
- After each snapshot of a home the older versions of its files are removed from the bucket for good, keeping the newest and the last of each of the last 6 clock hours; a bad snapshot cannot replace the only good copy of the day. It needs a key that may delete files.
- The "Minutes between snapshots" field of the admin settings did not turn Save on when it was edited; a test now checks that every field of the form does.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…guage instead of reading it once

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…cks over the editor

An address typed in the bar loads in the tab that is shown (Back returns); a name is counted from the home folder, a port goes to the workspace's program, other sites are refused and a missing file says so. + opens an empty tab with suggestions. The pane can be dragged by its grip over the editor or the terminal, or out of the window to pop out. The sandbox bar above the page is removed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e a note of their own (a note is at most 220 words)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@vickeykumar
vickeykumar merged commit 1101538 into master Nov 14, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant